import Button from '@/components/components/Button/index.ts';
import Menu from '@/components/components/Menu/index.ts';
import SubMenu from '@/components/components/SubMenu/index.ts';
import MenuItemGroup from '@/components//components/MenuItemGroup';
// import ButtonGroup from '../../components/component/ButtonGroup';
// import Input from '../../components/component/Input';
// import Textarea from '../../components/component/Textarea';
// import Select from '../../components/component/Select';
// import SelectItem from '../../components/component/SelectItem';
// import Table from '../../components/component/Table';
// import TableColumn from '../../components/component/TableColumn';
// import Tooltip from '../../components/component/Tooltip';
// import Radio from '../../components/component/Radio';
// import Checkbox from '../../components/component/Checkbox';
// import ColorPicker from '../../components/component/ColorPicker';
// import Popup from '../../components/component/Popup';
// import DatePicker from '../../components/component/DatePicker';

const components = [
    Button,
    Menu,
    SubMenu,
    MenuItemGroup,
    // ButtonGroup,
    // Input,
    // Textarea,
    // Select,
    // SelectItem,
    // Table,
    // TableColumn,
    // Tooltip,
    // Radio,
    // Checkbox,
    // ColorPicker,
    // Popup,
    // DatePicker
]

/**
 * 全量加载组件
 * @param app
 */
const install = (app: any) => {
    // 判断是否安装
    // if (install2.installed) return
    // 遍历注册全局组件
    components.map(component => {
        app.component(component.name, component)
    })
}

export default {
    install,
}

export {
    install,
    Button,
    Menu,
    SubMenu,
    MenuItemGroup,
    // ButtonGroup,
    // Input,
    // Textarea,
    // Select,
    // SelectItem,
    // Table,
    // TableColumn,
    // Tooltip,
    // Radio,
    // Checkbox,
    // ColorPicker,
    // Popup,
    // DatePicker
}